/*
 * @Author: KKKKKK
 * @Date: 2021-01-10 12:08:35
 * @LastEditors: KKKKKK
 * @LastEditTime: 2021-01-10 12:08:35
 */
import axios from './config'
import url from './url'
const baseUrl = process.env.VUE_APP_BASE_URL

/* 评价 */
// 新增评价
const evaluateCreate = (params) => axios.post(baseUrl + url.evaluate.create, params)

// 删除评价
const evaluateDelete = (id) => axios.delete(baseUrl + url.evaluate.delete + `/${id}`)

// 修改评价
const evaluateUpdate = (params, id) => axios.post(baseUrl + url.evaluate.update + `/${id}`, params)

// 获取某个评价
const evaluateLoad = (id) => axios.get(baseUrl + url.evaluate.load + `/${id}`)

// 获取评价列表
const evaluatePage = (params) => axios.get(baseUrl + url.evaluate.page, { params })

export default {
    evaluateCreate,
    evaluateDelete,
    evaluateUpdate,
    evaluateLoad,
    evaluatePage,
}
